<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>设置</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<%-- <link rel="stylesheet"
	href="<c:url value='/template/lead_into/yuanban_layui/layui/css/layui.css'/>"
	media="all"> --%>
<!-- 最新导入 -->
<%-- <script type="text/javascript"
	src="<c:url value='/template/new_muban/js/jquery-min-1.7.js'/>"></script>
<script type="text/javascript" src="<c:url value='/template/new_muban/js/xadmin.js'/>"></script>
<link rel="stylesheet" href="<c:url value='/template/new_muban/css/xadmin.css'/>">	 --%>
<!-- 轮播 -->
<%-- <script src="<c:url value='/template/new_muban/lib/layui/layui.js'/>"
	charset="utf-8"></script> --%>

<!-- 新模板 -->
<link rel="shortcut icon" href="<c:url value='/template/new_muban/images/favicon.ico'/>" type="image/x-icon"/>

<!-- 最新导入 -->
 <script type="text/javascript" src="<c:url value='/template/new_muban/js/jquery-min-1.7.js'/>"></script>
<link rel="stylesheet" href="<c:url value='/template/new_muban/css/font.css'/>">
<link rel="stylesheet" href="<c:url value='/template/new_muban/css/xadmin.css'/>">  
<script src="<c:url value='/template/new_muban/lib/layui/layui.js'/>" charset="utf-8"></script> 
<script type="text/javascript" src="<c:url value='/template/new_muban/js/xadmin.js'/>"></script>

<link rel="stylesheet" href="<c:url value='/template/new_muban/lib/layui/css/layui.css'/>"  media="all">

<!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
<!-- 富文本编辑器 -->
<script type="text/javascript" charset="utf-8" src="<c:url value='/ue/ueditor.config.js'/>"></script>
<script type="text/javascript" charset="utf-8" src="<c:url value='/ue/ueditor.all.js'/>"> </script>
<style>
.layui-upload-img {
	width: 92px;
	height: 92px;
	margin: 0 10px 10px 0;
}
</style>
<style type="text/css">
.uploader-list {
	margin-left: -15px;
}

.uploader-list .info {
	position: relative;
	margin-top: -25px;
	background-color: black;
	color: white;
	filter: alpha(Opacity = 80);
	-moz-opacity: 0.5;
	opacity: 0.5;
	width: 100px;
	height: 25px;
	text-align: center;
	display: none;
}

.uploader-list .handle {
	position: relative;
	background-color: black;
	color: white;
	filter: alpha(Opacity = 80);
	-moz-opacity: 0.5;
	opacity: 0.5;
	width: 100px;
	text-align: right;
	height: 18px;
	margin-bottom: -18px;
	display: none;
}

.uploader-list .handle i {
	margin-right: 5px;
}

.uploader-list .handle i:hover {
	cursor: pointer;
}

.uploader-list .file-iteme {
	margin: 12px 0 0 15px;
	padding: 1px;
	float: left;
}
</style>
</head>
<body>

 <div class="x-body">
<form class="layui-form">
	<%-- <input type="hidden" name="ha_share_img" id="ha_share_img" value="${supplyDetails.logo}" lay-verify="required"> --%>

	<fieldset class="layui-elem-field layui-field-title"
			style="margin-top: 30px;">
			<legend>设置</legend>
		</fieldset>
	<div class="layui-form-item">
	    <label class="layui-form-label">
	    	<span class="x-red">*</span>企业名称
	    </label>
	    <div class="layui-input-block">
	      <input type="text" name="b_name"  maxlength="49"  value="${setDetails.b_name}" id="b_name" lay-verify="required" autocomplete="off" placeholder="请输入企业名称" class="layui-input">
	     
	    </div>
	  </div>
	  
	  <div class="layui-form-item">
		    <div class="layui-inline">
		      <label class="layui-form-label"><span class="x-red">*</span>联系人</label>
		      <div class="layui-input-inline">
		        <input type="tel" name="b_username"  id ="b_username" value="${setDetails.b_username}" placeholder="请输入联系人姓名" lay-verify="required" autocomplete="off" class="layui-input">
		      </div>
		    </div>
		    <div class="layui-inline">
		      <label class="layui-form-label"><span class="x-red">*</span>联系人电话</label>
		      <div class="layui-input-inline">
		        <input type="text" name="b_phone" id ="b_phone" value="${setDetails.b_phone}" placeholder="请输入联系人电话" lay-verify="required" autocomplete="off" class="layui-input">
		      </div>
		    </div>
		  </div>
 <div class="layui-form-item">
		      <label class="layui-form-label"><span class="x-red">*</span>播放时长</label>
		      <div class="layui-input-inline">
		        <input type="text" name="b_millis" id ="b_millis" value="${setDetails.b_millis}" placeholder="请输入分需要播放的时长"  lay-verify="required" autocomplete="off" class="layui-input">
		      
 				
             </div>
             <div class="layui-form-mid layui-word-aux">
                  <span class="x-red">*</span>赠送积分需要播放的时长,以秒为单位
              </div>
		    </div>
		      
		  </div>

  <div class="layui-form-item">
              <label for="username" class="layui-form-label">
                  <span class="x-red">*</span>代存扣除
              </label>
              <div class="layui-input-inline">
                  <input type="text" id="b_escrow" name="b_escrow" value="${setDetails.b_escrow}" placeholder="请输入代存库扣除金额" required="" lay-verify="required"
                  autocomplete="off" class="layui-input" onkeyup="clearNoNum(this);">
              </div>
               <div class="layui-form-mid layui-word-aux">
                  <span class="x-red">*</span>按斤扣除,实际扣除乘商品的重量
              </div>
          </div>
  <div class="layui-form-item">
              <label for="username" class="layui-form-label">
                  <span class="x-red">*</span>送货扣除
              </label>
              <div class="layui-input-inline">
                  <input type="text" id="b_delivery" name="b_delivery" value="${setDetails.b_delivery}" placeholder="请输入送货扣除金额" required="" lay-verify="required"
                  autocomplete="off" class="layui-input" onkeyup="clearNoNum(this);">
              </div>
               <div class="layui-form-mid layui-word-aux">
                  <span class="x-red">*</span>按斤扣除,实际扣除乘商品的重量
              </div>
          </div>
           <div class="layui-form-item">
              <label for="username" class="layui-form-label">
                  <span class="x-red">*</span>代售行情价
              </label>
              <div class="layui-input-inline">
                  <input type="text" id="b_commissionmoney" name="b_commissionmoney" value="${setDetails.b_commissionmoney}" placeholder="请输入送货扣除金额" required="" lay-verify="required"
                  autocomplete="off" class="layui-input" onkeyup="clearNoNum(this);">
              </div>
               <div class="layui-form-mid layui-word-aux">
                  <span class="x-red">*</span>代售的商品每斤价格
              </div>
          </div>
   <div class="layui-form-item">
              <label for="username" class="layui-form-label">
                  <span class="x-red">*</span>礼盒费用
              </label>
              <div class="layui-input-inline">
                  <input type="text" id="b_lihe" name="b_lihe" value="${setDetails.b_lihe}" placeholder="请输入代售扣除金额" required="" lay-verify="required"
                  autocomplete="off" class="layui-input" onkeyup="clearNoNum(this);">
              </div>
              <!--   <div class="layui-form-mid layui-word-aux">
                  <span class="x-red">*</span>按斤扣除,实际扣除乘商品的重量
              </div> -->
          </div>        
          
          
		<div class="layui-form-item layui-form-text">
			<label for="desc" class="layui-form-label"> <span
				class="x-red">*</span>海报图
			</label>
			<div class="layui-input-inline">
				<button type="button" class="layui-btn" id="b_poster_img_btn">海报图</button>
				<div class="layui-upload-list">
				<input type="hidden" name="b_poster_img" id="b_poster_img" value="${setDetails.b_poster_img}" lay-verify="required">
					<img class="layui-upload-img" id="b_poster_img_demo" src="${setDetails.b_poster_img}">
					<p id="b_poster_img_demoText"></p>
				</div>
			</div>
		</div>

<div class="layui-form-item layui-form-text">
			<label for="desc" class="layui-form-label"> 
				背景音乐
			</label>
			<div class="layui-input-block">
				<button type="button" class="layui-btn" id="music_btn"><i class="layui-icon"></i>上传音频</button> 
				<div class="layui-upload-list">
					<input type="text" name="b_bgmusic"  class="layui-input" id="b_bgmusic" value="${setDetails.b_bgmusic}" >
					<p>请使用按钮上传</p>
				</div>
			</div>
		</div>
		<%-- <div class="layui-form-item layui-form-text">
			<label for="desc" class="layui-form-label"> 
				<span class="x-red">*</span>轮播图
			</label>
			<div class="layui-input-block">
				<div class="layui-upload">
					<button type="button" class="layui-btn" id="test2">多图上传</button>
					<blockquote class="layui-elem-quote layui-quote-nm"
						style="margin-top: 10px; width: 88%">
						预览图：
						<div class="layui-upload-list uploader-list" style="overflow: auto;"
							id="uploader-list">
							<c:forTokens items="${supplyDetails.banner}" delims="," var="banner">  
						         
							 <div id="" class="file-iteme">
							 <div class="handle"><i class="layui-icon layui-icon-delete"></i></div>
							 	<img style="width: 100px;height: 100px;" src="<c:out value="${banner}"/>">
									<div class="info"></div>
							</div>
						    </c:forTokens> 
	                    
						
							
							
						</div>
					</blockquote>
				</div>
			
			</div>
		</div> --%>
		<%-- <div class="layui-form-item">
	    <label class="layui-form-label">
	    	<span class="x-red">*</span>一句话简介
	    </label>
	    <div class="layui-input-block">
	      <input type="text" name="little_desc" maxlength="49" value="${supplyDetails.little_desc}" id="little_desc" lay-verify="required" autocomplete="off" placeholder="请输入店铺名称" class="layui-input">
	     
	    </div>
	  </div> --%>
		<div class="layui-form-item">
	    <label class="layui-form-label">
	    	<span class="x-red">*</span>地址
	    </label>
	    <div class="layui-input-block">
	      <input type="text" name="b_address"   maxlength="49" value="${setDetails.b_address}" id="b_address" lay-verify="required" autocomplete="off" placeholder="请输入店铺名称" class="layui-input">
	     
	    </div>
	  </div>
	   <div class="layui-form-item">
		    <div class="layui-inline">
		      <label class="layui-form-label"><span class="x-red">*</span>经度</label>
		      <div class="layui-input-inline">
		        <input type="text" name="b_lon"  id ="b_lon" value="${setDetails.b_lon}" placeholder="请输入经度" lay-verify="required" autocomplete="off" class="layui-input">
		      </div>
		    </div>
		    <div class="layui-inline">
		      <label class="layui-form-label"><span class="x-red">*</span>纬度</label>
		      <div class="layui-input-inline">
		        <input type="text" name="b_lat" id ="b_lat" value="${setDetails.b_lat}" placeholder="请输入纬度" lay-verify="required" autocomplete="off" class="layui-input">
		      </div>
		    </div>
		     <div class="layui-inline">
		      <div class="layui-input-inline">
		        <a href="https://lbs.qq.com/tool/getpoint/" target="_blank">点击这里,坐标拾取</a>
		      </div>
		    </div>
		    
		  </div>
		  
		<div class="layui-form-item" >
    <label for="L_username" class="layui-form-label"><span class="x-red">*</span>发货说明</label>
    <div class="layui-input-block">
		<script id="editor4" name="editor4" type="text/plain" style="width:100%;height:500px;">${setDetails.b_fhtext}</script>
    </div>         		 
 </div>   
		<div class="layui-form-item" >
    <label for="L_username" class="layui-form-label"><span class="x-red">*</span>佣金说明</label>
    <div class="layui-input-block">
		<script id="editor3" name="editor3" type="text/plain" style="width:100%;height:500px;">${setDetails.b_commission_shuoming}</script>
    </div>         		 
 </div>   
  

	<div class="layui-form-item" >
    <label for="L_username" class="layui-form-label"><span class="x-red">*</span>须知</label>
    <div class="layui-input-block">
		<script id="editor1" name="editor1" type="text/plain" style="width:100%;height:500px;">${setDetails.b_explain}</script>
    </div>         		 
 </div>  
<div class="layui-form-item" >
    <label for="L_username" class="layui-form-label"><span class="x-red">*</span>帮助说明</label>
    <div class="layui-input-block">
		<script id="editor2" name="editor2" type="text/plain" style="width:100%;height:500px;">${setDetails.b_help}</script>
    </div>         		 
 </div> 
<div class="layui-form-item layui-form-text">
              <label for="desc" class="layui-form-label">
          <span class="x-red">*</span>企业介绍
              </label>
              <div class="layui-input-block" >
               	<script id="editor" type="text/plain" style="width:100%;height:500px;">${setDetails.b_introduce}</script>
              </div>
           </div>

		<div class="layui-form-item">
			<label for="L_repass" class="layui-form-label"></label>
			<button class="layui-btn" lay-filter="add" lay-submit="">修改
			</button>
		</div>
	</form>

</div>
</body>

<script>
	
//多图容器 【注册全局变量】
//var sss = "${supplyDetails.banner}";
//var stringResult = 
//var images = sss.split(',');
//var images = [];

layui.use('upload', function(){
	  var $ = layui.jquery
	  ,upload = layui.upload;

	//多图片上传
	var uploadInst = upload.render({
		elem: '#test2'
            ,url: "<c:url value='/uploadToQiNiu.do'/>"
            ,multiple: true
            ,before: function(obj){
                layer.msg('图片上传中...', {
                    icon: 16,
                    shade: 0.01,
                    time: 0
                })
            }
            ,done: function(res){
            	//console.log(res);
            	//console.log(res.file_url);
                layer.close(layer.msg());//关闭上传提示窗口
                var title = res.file_url;
                var i1 = title.lastIndexOf("_"); //3
                title = title.substr(i1 +1);
                
                if ($(".file-iteme").length >=5) {
            		return layer.msg('上传图片不能多于5张！');
				  }else{
					  
	                //上传完毕
	                $('#uploader-list').append(
	                    '<div id="" class="file-iteme">' +
	                    '<div class="handle"><i class="layui-icon layui-icon-delete"></i></div>' +
	                    '<img style="width: 100px;height: 100px;" src='+ res.file_url +'>' +
	                    '<div class="info">' + title + '</div>' +
	                    '</div>'
	                    
	                );
	                  //追加图片成功追加文件名至图片容器
	                    images.push(res.file_url);
				 }
                
            }
	});
	
	
	
	
	
	
	/* 单图  */
	 upload.render({
		    elem: '#b_poster_img_btn'
	 	   ,url: '<%=request.getContextPath()%>/uploadToQiNiu.do'
	 	   ,auto:true
	 	,size: 1024//限制文件大小，单位 KB
	 	   ,exts: 'jpg|png'
	 	   ,xhr:xhrOnProgress
	 	   ,progress:function(value){//上传进度回调 value进度值
	 	     console.log(value);
	 	     element.progress('demo', value+'%')//设置页面进度条
	 	    }
	 	   //,bindAction: '#test-upload-change-action'
	 	   ,before: function(obj){
	 	   //返回的参数item，即为当前的input DOM对象
	 	     layer.load(); //上传loading
	 	       console.log('文件上传中');
	 	 
	 	     //预读本地文件示例，不支持ie8
	 	     obj.preview(function(index, file, result){
	 	       $('#b_poster_img_demo').attr('src', result); //图片链接（base64）
	 	     });
	 	 
	 	   }
	 	   ,done: function(res){
	 	     console.log("返回码 : "+res.code);
	 		
	  		 //如果上传失败
	 	      if(res.code != 200){
	 	        return layer.msg('上传失败');
	 	      }
	 	     layer.closeAll();
	 	     layer.msg("上传成功");
	 	      //上传成功
	 	      $("#b_poster_img").val(res.file_url);
	 		
	 	   },error: function(){
		      //演示失败状态，并实现重传
		      var demoText = $('#b_poster_img_demoText');
		      demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
		      demoText.find('.demo-reload').on('click', function(){
		        uploadInst.upload();
		      });
		    }

	});
	
	
	  upload.render({
		    elem: '#music_btn'
		    ,url: '<%=request.getContextPath()%>/uploadToQiNiu.do' //改成您自己的上传接口
		    ,accept: 'audio' //音频
		    ,done: function(res){
		      layer.msg('上传成功');
		      $("#b_bgmusic").val(res.file_url);
		    }
		  });
	
	
	
	
	
	
	
	
});


$(document).on("mouseenter mouseleave", ".file-iteme", function(event){
    if(event.type === "mouseenter"){
        //鼠标悬浮
        $(this).children(".info").fadeIn("fast");
        $(this).children(".handle").fadeIn("fast");
    }else if(event.type === "mouseleave") {
        //鼠标离开
        $(this).children(".info").hide();
        $(this).children(".handle").hide();
    }
});

//删除图片
$(document).on("click", ".file-iteme .handle", function(event){
    
    var  $this = $(this).parent();   //  习惯性保存下当前标签
    var index = $this.index();
    console.log("删除位置"+ index );
    
    
    $(this).parent().remove();
	  console.log(images.toString());
  //获取下标
	//var subscript=$("#uploader-list img").index($(this));  
	//console.log("下标  :  "+subscript);
	
	    console.log("数组长度  : "+images.length);
	
	    
	//删除数组
	images.splice(index, 1);
	//重新排序
	//images.sort();
	 console.log("数组长度  : "+images.length);
    console.log(images.toString());
    
});



layui.use(['form','layer'], function(){
    $ = layui.jquery;
  var form = layui.form
  ,layer = layui.layer;

  //监听提交
  form.on('submit(add)', function(data){
   // console.log(data);
/*    if ($(".file-iteme").length < 1) {
	   return layer.msg('上传图片不能少于1张！');
   }  */
/*    console.log("图片几张 : "+$(".file-iteme").length );
   if ($(".file-iteme").length < 1) {
	   layer.msg('上传图片不能少于1张!',{icon: 2,time:3000});   
		return false;
 } */
 var b_id = "${setDetails.b_id}";
 
  var b_name = $("#b_name").val();
   
  var b_username = $("#b_username").val();
  
  var b_phone = $("#b_phone").val();
  
  var b_poster_img = $("#b_poster_img").val();
  
  var b_lon = $("#b_lon").val();
  var b_lat = $("#b_lat").val();
  
  
  
  
  var b_address = $("#b_address").val();
   //var banner = images.toString();
  //console.log("要传递的  :  "+banner);

 var b_lihe = $("#b_lihe").val();
 var b_escrow = $("#b_escrow").val();
 var b_delivery = $("#b_delivery").val();
 
 var b_millis = $("#b_millis").val();
 
 //活动详情
 var b_introduce = UE.getEditor('editor').getContent();
 if(b_introduce == "" || b_introduce == null){
	  layer.msg('请输入企业介绍!',{icon: 2,time:3000});      
  	  return false; 
 }  
 var b_explain = UE.getEditor('editor1').getContent();
 if(b_explain == "" || b_explain == null){
	  layer.msg('请输入须知!',{icon: 2,time:3000});      
  	  return false; 
 }  
 var b_help = UE.getEditor('editor2').getContent();
 if(b_help == "" || b_help == null){
	  layer.msg('请输入帮助说明!',{icon: 2,time:3000});      
  	  return false; 
 }  
 
 var b_commission_shuoming = UE.getEditor('editor3').getContent();
 if(b_commission_shuoming == "" || b_commission_shuoming == null){
	  layer.msg('请输入佣金说明!',{icon: 2,time:3000});      
  	  return false; 
 } 
 var b_fhtext = UE.getEditor('editor4').getContent();
 if(b_fhtext == "" || b_fhtext == null){
	  layer.msg('请输入发货说明!',{icon: 2,time:3000});      
  	  return false; 
 }  
 
 
 var b_bgmusic = $("#b_bgmusic").val();
 
 
 var b_commissionmoney = $("#b_commissionmoney").val();
 
  //发异步，把数据提交给php
   $.ajax({
       type: "POST",
       async : false, // 注意此处需要yi步  
       url:  "<c:url value='/updateSet.do'/>",
       traditional: true,
       data: {
    	   		"b_id":b_id,"b_name":b_name,"b_username":b_username,"b_phone":b_phone,"b_poster_img":b_poster_img,"b_introduce":b_introduce
    	   		,"b_help":b_help,"b_explain":b_explain,"b_address":b_address,"b_lon":b_lon,"b_lat":b_lat,"b_lihe":b_lihe,"b_escrow":b_escrow,"b_delivery":b_delivery,"b_millis":b_millis,"b_commission_shuoming":b_commission_shuoming,
    	   		"b_bgmusic":b_bgmusic,"b_fhtext":b_fhtext,"b_commissionmoney":b_commissionmoney
       		},
       success: function(data){
           if (data == 0) {
        	   layer.msg('修改失败!',{icon: 2,time:3000});      
               return false;
           } else if(data == 1)  {

           	  layer.msg("修改成功", {icon: 6,time:500},function () {
                     // 获得frame索引
                     var index = parent.layer.getFrameIndex(window.name);
                     //alert(index);
                     //关闭当前frame
                     parent.layer.close(index);
                     //重新加载父页面
                     parent.location.reload();
                 });
           } 
      }
    });   
 	//禁止页面自动跳转
    return false;
  });
});
</script>
<!-- 图片上传可视化用 -->
<script type="text/javascript">
//该部分代码主要使用ajax的xhr属性，我copy别人的，自己也不会写，应该不用管。

   var xhrOnProgress=function(fun) {
      xhrOnProgress.onprogress = fun; //绑定监听
       //使用闭包实现监听绑
      return function() {
          //通过$.ajaxSettings.xhr();获得XMLHttpRequest对象
          var xhr = $.ajaxSettings.xhr();
           //判断监听函数是否为函数
            if (typeof xhrOnProgress.onprogress !== 'function')
                 return xhr;
             //如果有监听函数并且xhr对象支持绑定时就把监听函数绑定上去
              if (xhrOnProgress.onprogress && xhr.upload) {
                    xhr.upload.onprogress = xhrOnProgress.onprogress;
              }
              return xhr;
       }
   };

// 图片弹出层
layui.use('layer', function(){
    $ = layui.jquery;//jquery
  layer = layui.layer;//弹出层

  //以上模块根据需要引入
	//轮播图弹出
    layer.ready(function(){ //为了layer.ext.js加载完毕再执行
      layer.photos({
        photos: '#x-img'
        //,shift: 5 //0-6的选择，指定弹出图片动画类型，默认随机
      });
    });

}); 
</script>
<!-- ue初始化 -->
		<script type="text/javascript">
			var ue = UE.getEditor('editor',{
				autoFloatEnabled:true,//浮动
				toolbars: [[
		    		'source','bold', 'italic',  'removeformat', 'formatmatch', 'autotypeset','selectall', 'cleardoc', 
		           'lineheight', '|','fontfamily', 'fontsize', 'forecolor', 'backcolor','|',
		            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|','insertimage', 'emotion', 
		        ]]
			});
			
			 var ue2 = UE.getEditor('editor2',{
				autoFloatEnabled:true,//浮动
				toolbars: [[
		    		'source','bold', 'italic',  'removeformat', 'formatmatch', 'autotypeset','selectall', 'cleardoc', 
		           'lineheight', '|','fontfamily', 'fontsize', 'forecolor', 'backcolor','|',
		            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|','insertimage', 'emotion', 
		        ]]
			}); 
			
		
			var ue1 = UE.getEditor('editor1',{
				toolbars: [[
		    		'source','bold', 'italic',  'removeformat', 'formatmatch', 'autotypeset','selectall', 'cleardoc', 
		           'lineheight', '|','fontfamily', 'fontsize', 'forecolor', 'backcolor','|',
		            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|','insertimage', 'emotion', 'insertvideo'
		        ]]
		    }); 
			var ue3 = UE.getEditor('editor3',{
				toolbars: [[
		    		'source','bold', 'italic',  'removeformat', 'formatmatch', 'autotypeset','selectall', 'cleardoc', 
		           'lineheight', '|','fontfamily', 'fontsize', 'forecolor', 'backcolor','|',
		            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|','insertimage', 'emotion', 'insertvideo'
		        ]]
		    }); 
			var ue4 = UE.getEditor('editor4',{
				toolbars: [[
		    		'source','bold', 'italic',  'removeformat', 'formatmatch', 'autotypeset','selectall', 'cleardoc', 
		           'lineheight', '|','fontfamily', 'fontsize', 'forecolor', 'backcolor','|',
		            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|','insertimage', 'emotion', 'insertvideo'
		        ]]
		    }); 
		</script>
</html>